#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int flag = 1;
    double ret;
    double sum = 0;
    for(int i = 1;i<=n;i++)
    {
    	ret = (1.0/i)*flag;
    	sum += ret;
    	flag = -flag;
	}
	printf("%.4f",sum);
}

